package preferences;

import processing.core.*; 
import processing.opengl.*; 
import java.applet.*; 
import java.awt.*; 
import java.awt.image.*; 
import java.awt.event.*; 
import java.io.*; 
import java.net.*; 
import java.text.*; 
import java.util.*; 
import java.util.zip.*;
import javax.sound.midi.*; 
import javax.sound.midi.spi.*; 
import javax.sound.sampled.*; 
import javax.sound.sampled.spi.*; 
import java.util.regex.*; 
import javax.xml.parsers.*; 
import javax.xml.transform.*; 
import javax.xml.transform.dom.*; 
import javax.xml.transform.sax.*; 
import javax.xml.transform.stream.*; 
import org.xml.sax.*; 
import org.xml.sax.ext.*; 
import org.xml.sax.helpers.*; 


/**
 * Full Screen Application. 
 * 
 * The main() function needs to be added for the program to run full screen
 * after it is exported as an application. Select "Export Application" from the file
 * menu to build an app for Mac OS X, Windows, and Linux.
 * 
 * The screen.width and screen.height variables into size() ensure it will always be 
 * the width and height of the screen. Be certain the 2nd element in the array inside 
 * main() is identical to the name of the sketch. By default, pressing the Esc key will 
 * quit the application.
 */
public class FullScreen extends PApplet {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	static public void main(String args[]) {
		  PApplet.main(new String[] { "--present", "Stuff" });
		}

		public void setup() 
		{
		  size(screen.width, screen.height, OPENGL);
		  noStroke();
		}

		public void draw() 
		{
		  lights();
		  background(0);
		  
		  for (int x = 0; x <= width; x += 100) {
		    for (int y = 0; y <= height; y += 100) {
		      pushMatrix();
		      translate(x, y);
		      rotateY(map(mouseX, 0, width, 0, PI));
		      rotateX(map(mouseY, 0, height, 0, PI));
		      box(90);
		      popMatrix();
		    }
		  }
		}
}
	